Integrand size = 23, antiderivative size = 296 \[ \int \frac {\csc ^4(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {2 b^{4/3} \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^2 \sqrt {a^{2/3}-b^{2/3}} d}+\frac {b \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {2 b^{4/3} \text {arctanh}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}}}\right )}{3 a^2 \sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}} d}-\frac {2 b^{4/3} \text {arctanh}\left (\frac {\sqrt [3]{b}+(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 a^2 \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}} d}-\frac {\cot (c+d x)}{a d}-\frac {\cot ^3(c+d x)}{3 a d} \]
[Out]
Time = 0.30 (sec) , antiderivative size = 296, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3299, 3855, 3852, 2739, 632, 210, 212} \[ \int \frac {\csc ^4(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {b \text {arctanh}(\cos (c+d x))}{a^2 d}+\frac {2 b^{4/3} \arctan \left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^2 d \sqrt {a^{2/3}-b^{2/3}}}-\frac {2 b^{4/3} \text {arctanh}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b^{2/3}-(-1)^{2/3} a^{2/3}}}\right )}{3 a^2 d \sqrt {b^{2/3}-(-1)^{2/3} a^{2/3}}}-\frac {2 b^{4/3} \text {arctanh}\left (\frac {(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 a^2 d \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}-\frac {\cot ^3(c+d x)}{3 a d}-\frac {\cot (c+d x)}{a d} \]
[In]
[Out]
Rule 210
Rule 212
Rule 632
Rule 2739
Rule 3299
Rule 3852
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {b \csc (c+d x)}{a^2}+\frac {\csc ^4(c+d x)}{a}+\frac {b^2 \sin ^2(c+d x)}{a^2 \left (a+b \sin ^3(c+d x)\right )}\right ) \, dx \\ & = \frac {\int \csc ^4(c+d x) \, dx}{a}-\frac {b \int \csc (c+d x) \, dx}{a^2}+\frac {b^2 \int \frac {\sin ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx}{a^2} \\ & = \frac {b \text {arctanh}(\cos (c+d x))}{a^2 d}+\frac {b^2 \int \left (\frac {1}{3 b^{2/3} \left (\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}+\frac {1}{3 b^{2/3} \left (-\sqrt [3]{-1} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}+\frac {1}{3 b^{2/3} \left ((-1)^{2/3} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}\right ) \, dx}{a^2}-\frac {\text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (c+d x)\right )}{a d} \\ & = \frac {b \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a d}-\frac {\cot ^3(c+d x)}{3 a d}+\frac {b^{4/3} \int \frac {1}{\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^2}+\frac {b^{4/3} \int \frac {1}{-\sqrt [3]{-1} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^2}+\frac {b^{4/3} \int \frac {1}{(-1)^{2/3} \sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^2} \\ & = \frac {b \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a d}-\frac {\cot ^3(c+d x)}{3 a d}+\frac {\left (2 b^{4/3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{a}+2 \sqrt [3]{b} x+\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^2 d}+\frac {\left (2 b^{4/3}\right ) \text {Subst}\left (\int \frac {1}{-\sqrt [3]{-1} \sqrt [3]{a}+2 \sqrt [3]{b} x-\sqrt [3]{-1} \sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^2 d}+\frac {\left (2 b^{4/3}\right ) \text {Subst}\left (\int \frac {1}{(-1)^{2/3} \sqrt [3]{a}+2 \sqrt [3]{b} x+(-1)^{2/3} \sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^2 d} \\ & = \frac {b \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a d}-\frac {\cot ^3(c+d x)}{3 a d}-\frac {\left (4 b^{4/3}\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^{2/3}-b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}+2 \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^2 d}-\frac {\left (4 b^{4/3}\right ) \text {Subst}\left (\int \frac {1}{-4 \left ((-1)^{2/3} a^{2/3}-b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}-2 \sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^2 d}-\frac {\left (4 b^{4/3}\right ) \text {Subst}\left (\int \frac {1}{4 \left (\sqrt [3]{-1} a^{2/3}+b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}+2 (-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^2 d} \\ & = \frac {2 b^{4/3} \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^2 \sqrt {a^{2/3}-b^{2/3}} d}+\frac {b \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {2 b^{4/3} \text {arctanh}\left (\frac {\sqrt [3]{b}-\sqrt [3]{-1} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}}}\right )}{3 a^2 \sqrt {-(-1)^{2/3} a^{2/3}+b^{2/3}} d}-\frac {2 b^{4/3} \text {arctanh}\left (\frac {\sqrt [3]{b}+(-1)^{2/3} \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}}}\right )}{3 a^2 \sqrt {\sqrt [3]{-1} a^{2/3}+b^{2/3}} d}-\frac {\cot (c+d x)}{a d}-\frac {\cot ^3(c+d x)}{3 a d} \\ \end{align*}
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 1.45 (sec) , antiderivative size = 333, normalized size of antiderivative = 1.12 \[ \int \frac {\csc ^4(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {-8 a \cot \left (\frac {1}{2} (c+d x)\right )+24 b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-24 b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 i b^2 \text {RootSum}\left [-b+3 b \text {$\#$1}^2-8 i a \text {$\#$1}^3-3 b \text {$\#$1}^4+b \text {$\#$1}^6\&,\frac {2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right )-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right )-4 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^2+2 i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^2+2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^4-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^4}{b \text {$\#$1}-4 i a \text {$\#$1}^2-2 b \text {$\#$1}^3+b \text {$\#$1}^5}\&\right ]+8 a \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )-\frac {1}{2} a \csc ^4\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)+8 a \tan \left (\frac {1}{2} (c+d x)\right )}{24 a^2 d} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 1.48 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.55
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a}-\frac {1}{24 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {3}{8 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}+\frac {4 b^{2} \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +\textit {\_R} a}\right )}{3 a^{2}}}{d}\) | \(162\) |
default | \(\frac {\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a}-\frac {1}{24 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {3}{8 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}+\frac {4 b^{2} \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +\textit {\_R} a}\right )}{3 a^{2}}}{d}\) | \(162\) |
risch | \(\frac {4 i \left (3 \,{\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{3 d a \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a^{2} d}+16 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\left (12230590464 a^{14} d^{6}-12230590464 a^{12} b^{2} d^{6}\right ) \textit {\_Z}^{6}+15925248 a^{8} b^{4} d^{4} \textit {\_Z}^{4}-6912 a^{4} b^{6} d^{2} \textit {\_Z}^{2}+b^{8}\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\left (\frac {254803968 a^{12} d^{5}}{b^{7}}-\frac {254803968 a^{10} d^{5}}{b^{5}}\right ) \textit {\_R}^{5}+\left (-\frac {5308416 i d^{4} a^{9}}{b^{5}}+\frac {5308416 i d^{4} a^{7}}{b^{3}}\right ) \textit {\_R}^{4}+\frac {331776 a^{6} d^{3} \textit {\_R}^{3}}{b^{3}}+\left (-\frac {2304 i a^{5} d^{2}}{b^{3}}-\frac {4608 i a^{3} d^{2}}{b}\right ) \textit {\_R}^{2}-\frac {144 d \,a^{2} \textit {\_R}}{b}+\frac {i b}{a}\right )\right )+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a^{2} d}\) | \(269\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 4.05 (sec) , antiderivative size = 29423, normalized size of antiderivative = 99.40 \[ \int \frac {\csc ^4(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\csc ^4(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\int \frac {\csc ^{4}{\left (c + d x \right )}}{a + b \sin ^{3}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\csc ^4(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
\[ \int \frac {\csc ^4(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\int { \frac {\csc \left (d x + c\right )^{4}}{b \sin \left (d x + c\right )^{3} + a} \,d x } \]
[In]
[Out]
Time = 16.27 (sec) , antiderivative size = 1503, normalized size of antiderivative = 5.08 \[ \int \frac {\csc ^4(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\text {Too large to display} \]
[In]
[Out]